-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test the simulation mode code. #5712
Conversation
ce9c70c
to
d5ec93a
Compare
Changed to draft because a final sanity check/attempt to write an example for the docs showed up at least 2 exciting bugs. For the record these bugs are as follows: Traceback when trying to resubmit simulated task:Using example: [scheduling]
initial cycle point = 2359
[[graph]]
R1 = get_observations
[runtime]
[[get_observations]]
execution retry delays = PT2S
[[[simulation]]]
fail cycle points = all fails with traceback after the method Resubmit task hangs in waiting state:Using the same example but fixing the first bug. Resubmit hangs forever because the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approach looks good, I like having all the simulation stuff in once place!
Some minor comments.
6a4dd3b
to
74a6496
Compare
itask.summary['started_time'] = now | ||
timeout = ( | ||
itask.summary['started_time'] + | ||
itask.tdef.rtconfig['simulation']['simulated run length'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a real config item, added to the rtconfig['simulation']
dictionary at line 54.
itask.state(TASK_STATUS_WAITING) | ||
and | ||
itask.state(TASK_STATUS_WAITING) | ||
and itask.tdef.run_mode == 'live' # Polling in live mode only. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code within this section is designed to avoid problems with polling - but there will be no polling in simulation mode.
Co-authored-by: Oliver Sanders <oliver.sanders@metoffice.gov.uk>
* Remove unecessary rtc['platform'] (@MetRonnie spotted this).
* 'test.sim_mode' of github.com:wxtim/cylc: Update tests/functional/modes/03-simulation.t
@oliver-sanders - accidentally re-tagged you for review. Happy for you to re-approve |
While you're here Tim, could you check that restarting a workflow that has been running in simulation mode will restart it in simulation mode without having to specify it? I saw it restart in live mode, would be good to double check. Also the reverse. Oliver said trying to restart in simulation mode when it had been running in live mode merely restarted in live mode. |
Yes, if you restart you do not have to specify mode to get the same mode.
When I tried this on master it looks like it restarts in simulation mode (on master & my branch). Ick. That's a bug: I've opened an issue at #5781 |
409742f
to
5241558
Compare
This has two approvals, but I'm not sure if all questions addressed yet? If so, let's merge it. |
I think that I have addressed all questions. There is a comment from Ronnie about restart where the response was to create a new issue - the bit about what mode a restarted workflow uses. Agreed, but I think @MetRonnie or @oliver-sanders should press the button here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pending resolution of Oliver's comment #5712 (comment)
Closes #5654
Pre-requisite work for Skip mode
On an initial self-review I noticed that
configure_sim_modes
might as well be in thesimulation
module. I've moved it, but not squashed that commit down, because that way reviewers can see how I refactored it in a separate commit to the one I move it in.Check List
CONTRIBUTING.md
and added my name as a Code Contributor.setup.cfg
(andconda-environment.yml
if present).CHANGES.md
entry included if this is a change that can affect users?.?.x
branch.